<?php
$arguments['title'] = "保护区";
$arguments['location'] = array(
    "首页",
    "地图",
    "保护区",
);
$arguments['css'] = array(
    PUBLIC_LIB.'js/core/Pagination/kkpager_orange.css',
    PUBLIC_LIB.'fonts/hui_iconfont/iconfont.css',
    PUBLIC_LIB.'css/biz/enhanced.css',
    PUBLIC_LIB.'js/core/Dropdownlist/chosen.css',
    PUBLIC_LIB.'js/jquery/jquery-ui-1.11.4.custom/jquery-ui.css',
    PUBLIC_LIB.'js/core/fancybox/jquery.fancybox-1.3.4.css',
);
$arguments['js'] = array(
    PUBLIC_LIB.'js/core/fancybox/jquery-1.7.1.js',
    PUBLIC_LIB.'js/core/Pagination/kkpager.min.js',
    PUBLIC_LIB.'js/core/DatePicker/WdatePicker.js',
    PUBLIC_LIB.'js/biz/custominput.js', 
    PUBLIC_LIB.'js/core/Dropdownlist/chosen.jquery.js',  
    PUBLIC_LIB.'js/biz/pagelist.js',
    PUBLIC_LIB.'js/core/Tooltip/tooltip.js',
    PUBLIC_LIB.'js/jquery/jquery-ui-1.11.4.custom/jquery-ui.js',
    PUBLIC_LIB.'js/ajaxupload/ajaxfileupload.js',
    PUBLIC_LIB.'js/biz/ajaxfun.js',
    PUBLIC_LIB.'js/core/fancybox/jquery.fancybox-1.3.4.js',
    PUBLIC_LIB.'js/core/fancybox/jquery.fancybox-1.3.4.pack.js',
    PUBLIC_LIB.'js/biz/forbiddenzoneList.js',     
);
importHeader($arguments);
?>
<div class="formtitle"><span>保护区</span></div>
    <div class="search">
     <FORM id="form" method="post">
        <p>
            <div class="label_title">
                <label for="start_coord">起始坐标:</label>
            </div>
            <div class="search_text">
                <input  type="text" class="dfinput search_width" id="start_coord" name="start_coord" value=""/>
            </div>
            <div class="label_title">
                <label for="set_man">设置人:</label>
            </div>
            <div class="search_text">
                <input  type="text" class="dfinput search_width" id="set_man" name="set_man" value=""/>
            </div>
            <div class="label_title">
                <label for="stop_man">停止人:</label>
            </div>
            <div class="search_text">
                <input  type="text" class="dfinput search_width" id="stop_man" name="stop_man" value=""/>
            </div>
            <div class="label_title">
                <label for="current_state">当前状态：</label>
            </div>
            <div class="search_text">
                <select class="dfinput search_width" id="current_state" name="current_state">
                        <option value="">全部</option>
                        <option  value="0">已停止</option>
                        <option value="1">保护中</option>
                </select>    
            </div>
            <div>
                <button type="button" class="tool tool_left" id="search" style="width:100px;"><i class="Hui-iconfont">&#xe683;</i>查询</button>   
                <!-- <button type="button" class="tool tool_left" id="addForbiddenZone" style="width:100px;"><i class="Hui-iconfont">&#xe600;</i>新增</button> -->
            </div>
        </p>
        <p>
            <div class="label_title">
                <label for="set_date" class="label_checkbox">设置时间:</label>  
            </div>
            <div class="search_text">
                <input  type="text" class="dfinput search_width" id="date_start" name="date_start" onClick="WdatePicker()" value=""/>
            </div>  
            <div class="label_title">
                <label>至：</label>
            </div>
            <div class="search_text">
                <input  type="text" class="dfinput search_width" id="date_end" name="date_end" onClick="WdatePicker()" value=""/>
            </div>   
            <div class="label_title">
                <label for="stop_date" class="label_checkbox">停止时间:</label>  
            </div>
            <div class="search_text">
                <input  type="text" class="dfinput search_width" id="stopdate_start" name="stopdate_start" onClick="WdatePicker()" value=""/>
            </div>  
            <div class="label_title">
                <label>至：</label>
            </div>
            <div class="search_text">
                <input  type="text" class="dfinput search_width" id="stopdate_end" name="stopdate_end" onClick="WdatePicker()" value=""/>
            </div>   
        </p>
       </FORM>     
    </div>
    <div class="table_box tablelist">
        <table width="100%">
            <tr>
                <th width="10%">起始坐标</th>
                <th width="10%">长度</th>
                <th width="10%">宽度</th>
                <th width="10%">状态</th>
                <th width="15%">设置人</th>
                <th width="15%">设置时间</th>
                <th width="15%">停止人</th>
                <th width="15%">停止时间</th>
               <!--  <th width="20%">操作</th> -->
            </tr>
        </table>
        <table width="100%">
            <tr>
                <td width="10%">xxll0090</td>
                <td width="10%">ddsd4544</td>
                <td width="10%">100,200</td>
                <td width="10%">2015.3.3</td>
                <td width="15%">满载</td>
                <td width="15%">运行中</td>
                <td width="15%">否</td>
                <td width="15%">否</td>
               <!--  <td width="20%">
                    <a href=""><div class="tools tool_left" id="detail"><i class="Hui-iconfont">&#xe695;</i>详情</div></a>
                    <a href=""><div class="tools tool_left" id="forbiddenZoneEdit"><i class="Hui-iconfont">&#xe60c;</i>编辑</div></a>
                    <a href="javascript:forbiddenDelete();"><div class="tools tool_left"><i class="Hui-iconfont">&#xe609;</i>删除</div></a>
                </td> -->
            </tr>
            <?php
                if(isset($carList) && !empty($carList->list) && count($carList->list)>0){
                    foreach($carList->list as $car){
                        echo '<tr>
                            <td width="10%">',$car->vin,'</td>  
                            <td width="10%">',$car->state,'</td>  
                            <td width="10%">',$car->invoiceStatus==1?'已开票':'未开票','</td> 
                            <td width="5%">',$car->type,'</td> 
                            <td width="10%">',$car->ein,'</td> 
                            <td width="5%">',$car->color,'</td> 
                            <td width="5%">',$car->hubNum,'</td> 
                            <td width="10%">',$car->fuelType,'</td> 
                            <td width="5%">',$car->dpm,'</td>
                            <td width="5%">',$car->seatNum,'</td>    
                            <td width="30%">
                        <a href="#" onClick="lookDetail(\'',$car->vehicleId,'\');"><div class="tools tool_left"><i class="Hui-iconfont">&#xe695;</i>查看详情</div></a>
                    <a href="#" onClick="vehicleEdit(\'',$car->vehicleId,'\');"><div class="tools tool_left"><i class="Hui-iconfont">&#xe60c;</i>编辑</div></a>
                    <a href="#" onClick="deleteVehicle(\'',$car->vehicleId,'\',\'',$car->vin,'\')"><div class="tools tool_left"><i class="Hui-iconfont">&#xe609;</i>删除</div></a>
                    <div class="tools tool_left tool_btn"><i class="Hui-iconfont"></i>操作
                        <div class="tool_box">
                            <ul>';
                            if($car->arriveStatus==0)
                                echo '<a href="#" onClick="arriveRecAdd(\'',$car->vehicleId,'\');"><li id="tool1">到单<i class="Hui-iconfont not_adopt">&#xe6dd;</i></li></a>';
                            else
                                echo'<a href="#" onClick="arriveRecEdit(\'',$car->vehicleId,'\');"><li id="tool1">到单<i class="Hui-iconfont adopt">&#xe6e1;</i></li></a>';
                            if($car->taxStatus==0)
                                echo '<a href="#" onClick="taxAdd(\'',$car->vehicleId,'\');"><li id="tool2">垫税<i class="Hui-iconfont not_adopt">&#xe6dd;</i></li></a>';
                            else
                                echo'<a href="#" onClick="taxEdit(\'',$car->vehicleId,'\');"><li id="tool2">垫税<i class="Hui-iconfont adopt">&#xe6e1;</i></li></a>';
                            if($car->bondStatus==0)
                                echo '<a href="#" onClick="bondAdd(\'',$car->vehicleId,'\');"><li id="tool3">保税<i class="Hui-iconfont not_adopt">&#xe6dd;</i></li></a>';
                            else
                                echo'<a href="#" onClick="bondEdit(\'',$car->vehicleId,'\');"><li id="tool3">保税<i class="Hui-iconfont adopt">&#xe6e1;</i></li></a>';
                            if($car->enterStatus==0)
                                echo '<a href="#" onClick="enterAdd(\'',$car->vehicleId,'\');"><li id="tool4">入库<i class="Hui-iconfont not_adopt">&#xe6dd;</i></li></a>';
                            else
                                echo'<a href="#" onClick="enterEdit(\'',$car->vehicleId,'\');"><li id="tool4">入库<i class="Hui-iconfont adopt">&#xe6e1;</i></li></a>';
                            if($car->releaseStatus==0){
                                echo '<a href="#" id="dialog-link" onClick="release(\'',$car->vehicleId,'\',1)"><li id="tool4">申请放行<i class="Hui-iconfont not_adopt">&#xe6dd;</i></li></a>
                                    <a href="#" id="dialog-link" onClick="release(\'',$car->vehicleId,'\',2)"><li id="tool4">批准放行<i class="Hui-iconfont not_adopt">&#xe6dd;</i></li></a>';
                             }else{
                                if($car->releaseStatus==1)
                                    echo '<a href="#" id="dialog-link" onClick="release(\'',$car->vehicleId,'\',1)"><li id="tool4">申请放行<i class="Hui-iconfont adopt">&#xe6e1;</i></li></a>
                                        <a href="#" id="dialog-link" onClick="release(\'',$car->vehicleId,'\',2)"><li id="tool4">批准放行<i class="Hui-iconfont not_adopt">&#xe6dd;</i></li></a>';
                                else
                                    echo '<a href="#" id="dialog-link" onClick="release(\'',$car->vehicleId,'\',1)"><li id="tool4">申请放行<i class="Hui-iconfont adopt">&#xe6e1;</i></li></a>
                                        <a href="#" id="dialog-link" onClick="release(\'',$car->vehicleId,'\',2)"><li id="tool4">批准放行<i class="Hui-iconfont adopt">&#xe6e1;</i></li></a>';
                            }
                            if($car->invoiceStatus==0)
                                echo '<a href="#" onClick="invoiceAdd(\'',$car->vehicleId,'\');"><li id="tool7">发票<i class="Hui-iconfont not_adopt">&#xe6dd;</i></li></a>';
                            else
                                echo'<a href="#" onClick="invoiceEdit(\'',$car->vehicleId,'\');"><li id="tool7">发票<i class="Hui-iconfont adopt">&#xe6e1;</i></li></a>';
                            echo '</ul></div></div></td></tr>';
                    }
                }else{
                    echo '<tr><td colspan="10">',isset($noAuth)?$noAuth:"",'没有查询到任何车辆信息</td></tr>';
                }
            ?>
            
        </table>
    </div>
     <div class="pager" id="kkpager" data-total="<?php 
        if (empty($carList->list))
        {
            echo 1;
        }
        else 
        {
            echo $carList->page; 
        }
        ?>"></div>
<?php importFooter();?>